﻿namespace Grow.ServiceInvocation
{
    public interface IServiceInvocation
    {
        Task InvokeMethodAsync(ServiceInvocationTypeEnum serviceInvocationType, string appId, string methodName, CancellationToken cancellationToken = default);

        Task InvokeMethodAsync<TRequest>(ServiceInvocationTypeEnum serviceInvocationType, string appId, string methodName, TRequest request, CancellationToken cancellationToken = default);

        Task<TResponse?> InvokeMethodAsync<TResponse>(ServiceInvocationTypeEnum serviceInvocationType, string appId, string methodName, CancellationToken cancellationToken = default);
        Task<TResponse?> InvokeMethodAsync<TRequest, TResponse>(ServiceInvocationTypeEnum serviceInvocationType, string appId, string methodName, TRequest request, CancellationToken cancellationToken = default);
    }
}